package com.moon.controller;

import com.moon.dto.TAuction;
import com.moon.feign.AuctionFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RequestMapping("/auction")
@RestController
public class AuctionController {

    @Autowired
    AuctionFeign auctionFeign;

    @RequestMapping("/insert")
    public String insert(long productId, String basePrice, String stepPrice,
                         Integer auctionTime) {
        return auctionFeign.insert(productId, basePrice, stepPrice, auctionTime);
    }

    @RequestMapping("/start")
    public String start(TAuction auction){
        return auctionFeign.start(auction);
    }

}
